﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace WindowsGame1.Structs
{
    class Hitbox
    {
        List<Rectangle> hitbox_segments;
        Rectangle so = new Rectangle();

        public bool Contains(Rectangle value)
        {
            foreach (Rectangle seg in hitbox_segments)
            {
                if (seg.Contains(value))
                    return true;
            }
            return false;
        }

        public bool Contains(Point value)
        {
            foreach (Rectangle seg in hitbox_segments)
            {
                if (seg.Contains(value))
                    return true;
            }
            return false;
        }

        public bool Contains(Vector2 value)
        {
            Point value_p = new Point((int)value.X, (int)value.Y);
            foreach (Rectangle seg in hitbox_segments)
            {
                if (seg.Contains(value_p))
                    return true;
            }
            return false;
        }
    }


}
